<template>
	<view>
		<view class="wx-cells">
			<view class="wx-cell">
				<view class="wx-cell__bd flex_bd">
					<u-search placeholder="输入患者名字进行搜索" v-model="search" :show-action="false"></u-search>
				</view>
			</view>
			<view class="wx-cell">
				<view class="wx-cell__hd">
					开始时间
				</view>
				<view class="wx-cell__bd flex_bd">
					<u-calendar v-model="show1" mode="date" @change="change1"></u-calendar>
					<u-input v-model="value1" type="text" placeholder="2021-08-16" @click="show1 = true" />
				</view>
			</view>
			<view class="wx-cell">
				<view class="wx-cell__hd">
					结束时间
				</view>
				<view class="wx-cell__bd flex_bd">
						<u-calendar v-model="show2" mode="date" @change="change2"></u-calendar>
					<u-input v-model="value2" type="text" placeholder="2021-08-16" @click="show2 = true"/>
				</view>
			</view>
		</view>
	    <view class="hz-list">
			<view class="hz-list_item" v-for="item in list">
				<view class="hz-list__name">
					{{item.name}}
				</view>
				<view class="hz-list__date">
					日期：{{item.date}}
				</view>
				<view class="hz-list__status">
					<image :src="item.status" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				search: '',
				show1: false,
				show2: false,
				value1: '',
				value2: '',
				list:[{
					name:'张翼德',
					date:'2021-05-31 09:22:06',
					status:'../../static/images/status.png'
				},{
					name:'张晋如',
					date:'2021-05-31 09:22:06',
					status:'../../static/images/status.png'
				},{
					name:'徐丽',
					date:'2021-05-31 09:22:06',
					status:'../../static/images/status.png'
				},{
					name:'张翼德',
					date:'2021-05-31 09:22:06',
					status:'../../static/images/status.png'
				},{
					name:'张晋如',
					date:'2021-05-31 09:22:06',
					status:'../../static/images/status.png'
				},{
					name:'徐丽',
					date:'2021-05-31 09:22:06',
					status:'../../static/images/status.png'
				}]
			}
		},
		onLoad() {

		},
		methods: {
			change1(e) {
				console.log(e);
				this.value1 = e.result
			},
			change2(e) {
				console.log(e);
				this.value2 = e.result
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wx-cells {
		background-color: #fff;
	}

	.wx-cell {
		display: flex;
		align-items: center;
		padding: 16rpx 30rpx;
		position: relative;
		border-bottom: 1rpx solid #f5f7fa;
		line-height: 60rpx;
	}
	
	.wx-cell__hd{
		width: 180rpx;
	}
	
	.hz-list_item{
		background-color: #fff;
		border-radius: 12rpx;
		margin-bottom: 20rpx;
		height: 176rpx;
		position: relative;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding-left: 50rpx;
	}
	
	.hz-list{
		padding: 20rpx 30rpx;
	}
	
	.hz-list__name{
		font-size: 36rpx;
		color: #373b4f;
		line-height: 40rpx;
		margin-bottom: 10rpx;
	}
	
	.hz-list__date{
		font-size: 24rpx;
		color: #a09fa8;
		line-height: 40rpx;
	}
	
	.hz-list__status{
		position: absolute;
		right: 20rpx;
		bottom: 20rpx;
		width: 96rpx;
		height: 96rpx;
	}
	
	.hz-list__status image{
		width: 100%;
		height: 100%;
	}
</style>
